<template>
  <div>
    <h1>home</h1>
    <button @click="testGet">test get 请求</button>
  </div>
</template>

<script>
import ajax from "../api/ajax.js";
export default {
  mounted() {},
  methods: {
    async testGet() {
      const url = "/api/test";
      // url, method, params, headType
      const result = await ajax(url, "get", "", "json");
      console.log(result);
    }
  }
};
</script>

<style></style>
